//
// Description: 172. 阶乘后的零
// Created by Loading on 2025/4/6.
//

#include <bits/stdc++.h>

using namespace std;

int trailingZeroes(int n) {
    // 计算[1,n]中有多少个质因子5
    int res = 0;
    while (n) {
        res += n / 5;
        n /= 5;
    }

    return res;
}

int main() {
    int n = 3333;

    auto res = trailingZeroes(n);

    cout << res << endl;

    return 0;
}
